﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using YunCMS.DAL;
using YunCMS.Model;

public partial class data_fill_Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        YCModuleArticalDAL dal = new YCModuleArticalDAL();
        //YCModuleProductDAL dal = new YCModuleProductDAL();
        //YCModulePageDAL dal = new YCModulePageDAL();
        //YCUserLogDAL dal = new YCUserLogDAL();

        for (int i = 0; i < 100; i++)
        {
            YCModuleArtical model = new YCModuleArtical();
            //YCModuleProduct model = new YCModuleProduct();
            //YCModulePage model = new YCModulePage();

            model.Title = string.Format("第{0}篇", i.ToString());
            model.CategoryID = 3;
            model.Description = "asdh;alsdjaskldjas;dja;sdljas;dlkjasdl;kjas;dlkjas;dlkajsd;klj";
            model.Active = (i % 2 == 0);
            model.Author = "Daniel";
            model.IsHomePage = (i % 3 == 0);
            model.IsPopular = true;
            model.Content = @"alsdkjadja;sldkdjkas;dlkja;sldkjas;ldkja;sdklja;sldkja;sldkja;sldkja;slkdjal;skdja;sdlkja;sdklja;slkdja;slkdja;slkdja;skldja;sldkja;slkdja;slkdja;slkdja;slkdja;slkdja;slkdj";

            //YCUserLog model = new YCUserLog() { IPAddress = "127.0.0.1", ActionTime = DateTime.Now, Note = "asdj;askljd;laskdj", UserName = "Daniel" + i.ToString(), Module = "askdjlkj" };

            dal.Add(model);
        }
    }
}